import request from '@/utils/request'

// 查询生产员工列表
export function listTaskWorkers(query) {
  return request({
    url: '/mes/dispatchWorkers/list',
    method: 'get',
    params: query
  })
}

// 查询生产员工详细
export function getTaskWorkers(dispatchWorkerUuid) {
  return request({
    url: '/mes/dispatchWorkers/' + dispatchWorkerUuid,
    method: 'get'
  })
}

// 新增生产员工
export function addTaskWorkers(data) {
  return request({
    url: '/mes/dispatchWorkers',
    method: 'post',
    data: data
  })
}

// 修改生产员工
export function updateTaskWorkers(data) {
  return request({
    url: '/mes/dispatchWorkers',
    method: 'put',
    data: data
  })
}

// 删除生产员工
export function delTaskWorkers(dispatchWorkerUuid) {
  return request({
    url: '/mes/dispatchWorkers/' + dispatchWorkerUuid,
    method: 'delete'
  })
}
